import 'package:getx_demo/pages/alive/index.dart';
import 'package:getx_demo/pages/forgetSendSMS/index.dart';
import 'package:getx_demo/pages/home/index.dart';
import 'package:getx_demo/pages/mainTab/Bindings.dart';
import 'package:getx_demo/pages/mainTab/index.dart';
import 'package:getx_demo/pages/mine/index.dart';
import 'package:getx_demo/pages/userInfo/index.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../pages/forgetPwd/index.dart';
import '../../pages/index.dart';
import 'observers.dart';

abstract class RouteNames {
  /// 登录
  static const login = '/login';
  static const about = '/about';
  static const repwd = '/repwd';
  static const forgetPwd = '/forgetPwd';
  static const forgetSendSMS = '/forgetSendSMS';
  static const userInfo = '/userInfo';
  static const home = '/home';
  static const mainTab = '/main_tab';
  static const mine = '/mine';

  static const alive = '/alive';
}

abstract class AppPages {
  static const initial = RouteNames.login;
  static final RouteObserver<Route> observer = RouteObservers();
  static List<String> history = [];
  static final List<GetPage> routes = [
    GetPage(
      name: RouteNames.login,
      page: () => const LoginPage(),
      binding: LoginBinding(),
    ),
    GetPage(
      name: RouteNames.about,
      page: () => const AboutPage(),
    ),
    GetPage(
      name: RouteNames.repwd,
      page: () => const RepwdPage(),
    ),
    GetPage(
      name: RouteNames.forgetPwd,
      page: () => const ForgetpwdPage(),
    ),
    GetPage(
      name: RouteNames.forgetSendSMS,
      page: () => const ForgetsendsmsPage(),
    ),
    GetPage(
      name: RouteNames.userInfo,
      page: () => const UserinfoPage(),
    ),
    GetPage(
      name: RouteNames.mainTab,
      page: () => const MaintabPage(),
      binding: MainTabBinding(),
    ),
    GetPage(
      name: RouteNames.home,
      page: () => const HomePage(),
    ),
    GetPage(
      name: RouteNames.mine,
      page: () => const MinePage(),
    ),
    GetPage(
      name: RouteNames.alive,
      page: () => const AlivePage(),
    ),
  ];
}
